package com.zjitc.controller;/**
 * Create by IntelliJ IDEA
 *
 * @author: MaoYongQi
 * @date-Time: 2018/3/29 9:12
 * @description:
 */


import com.zjitc.common.ServerResponse;
import com.zjitc.model.Order;
import com.zjitc.service.OrderService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Create by IntelliJ IDEA
 * @author: MaoYongQi
 * @date-Time: 2018/3/29 9:12
 * @description:
 */

@SuppressWarnings("ALL")
@Controller
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService service;

    /**
     * 未完成
     * @param shippingId
     * @param order
     * @return
     */
    @RequestMapping(value = "/create")
    @ResponseBody
    public ServerResponse<Order>  create(String shippingId,
                                         @RequestParam(value = "order") Order order){
        ServerResponse<Order> response = service.create(shippingId,order);
        return response;
    }
}
